import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import SearchView from '../views/SearchView.vue'


// 创建路由全局
const router = createRouter({
  // 配置路由模式 #/xx/xx
  history: createWebHashHistory(),
  //路由模式/xx/xx
  // history: createWebHistory(import.meta.env.BASE_URL),
  // 路由规则模式
  routes: [
    {
      path: '/home',

      component: HomeView
    },
    {
      path: '/search',
      component: SearchView
    }
  ]
})

export default router
